cmake_minimum_required(VERSION 3.15)
project(test_prop_set)

enable_testing()
add_test(NAME mytest COMMAND echo "abc")

define_property(TEST PROPERTY test_prop BRIEF_DOCS "doc1" FULL_DOCS "doc2")
get_property(var1 TEST mytest PROPERTY test_prop SET)
message(STATUS "test_prop is set? = ${var1}")

set_property(TEST mytest APPEND PROPERTY test_prop "prop value")
get_property(var2 TEST mytest PROPERTY test_prop SET)
message(STATUS "test_prop is set? = ${var2}")

set_property(TEST mytest APPEND PROPERTY test_prop2 "prop value2")
get_property(var3 TEST mytest PROPERTY test_prop2 SET)
message(STATUS "test_prop2 is set? = ${var3}")

add_test(NAME mytest1 COMMAND echo "cba")
set_tests_properties(mytest mytest1 PROPERTIES test_prop3 "prop value3" test_prop4 "prop value4")
get_property(var4 TEST mytest PROPERTY test_prop3 SET)
message(STATUS "mytest-test_prop3 is set? = ${var4}")
get_property(var5 TEST mytest PROPERTY test_prop4 SET)
message(STATUS "mytest-test_prop4 is set? = ${var5}")
get_property(var6 TEST mytest1 PROPERTY test_prop3 SET)
message(STATUS "mytest1-test_prop3 is set? = ${var6}")
get_property(var7 TEST mytest1 PROPERTY test_prop4 SET)
message(STATUS "mytest1-test_prop4 is set? = ${var7}")
